/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.birrap.webservicebirrap;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Denver
 */
@Embeddable
public class BaresCervezasTapasVasosTPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_BAR")
    private int idBar;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_CERVEZA")
    private int idCerveza;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_TAPA")
    private int idTapa;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_VASO")
    private int idVaso;

    public BaresCervezasTapasVasosTPK() {
    }

    public BaresCervezasTapasVasosTPK(int idBar, int idCerveza, int idTapa, int idVaso) {
        this.idBar = idBar;
        this.idCerveza = idCerveza;
        this.idTapa = idTapa;
        this.idVaso = idVaso;
    }

    public int getIdBar() {
        return idBar;
    }

    public void setIdBar(int idBar) {
        this.idBar = idBar;
    }

    public int getIdCerveza() {
        return idCerveza;
    }

    public void setIdCerveza(int idCerveza) {
        this.idCerveza = idCerveza;
    }

    public int getIdTapa() {
        return idTapa;
    }

    public void setIdTapa(int idTapa) {
        this.idTapa = idTapa;
    }

    public int getIdVaso() {
        return idVaso;
    }

    public void setIdVaso(int idVaso) {
        this.idVaso = idVaso;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idBar;
        hash += (int) idCerveza;
        hash += (int) idTapa;
        hash += (int) idVaso;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BaresCervezasTapasVasosTPK)) {
            return false;
        }
        BaresCervezasTapasVasosTPK other = (BaresCervezasTapasVasosTPK) object;
        if (this.idBar != other.idBar) {
            return false;
        }
        if (this.idCerveza != other.idCerveza) {
            return false;
        }
        if (this.idTapa != other.idTapa) {
            return false;
        }
        if (this.idVaso != other.idVaso) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.birrap.webservicebirrap.BaresCervezasTapasVasosTPK[ idBar=" + idBar + ", idCerveza=" + idCerveza + ", idTapa=" + idTapa + ", idVaso=" + idVaso + " ]";
    }
    
}
